package com.hl.domain;

import java.math.BigDecimal;
import java.util.Date;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 用户购物车对象 shopping_cart
 * 
 * @author ruoyi
 * @date 2025-08-12
 */
public class ShoppingCart extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 购物车项ID */
    private Integer id;

    /** 关联用户ID */
    private Integer memberId;

    /** 关联商品ID */
    private Integer productId;

    /** 商品数量 */
    private Integer quantity;

    /** 加入时价格快照 */
    private BigDecimal price;

    /** 商品实时价格 */
    private BigDecimal currentPrice;

    /** 购物车中的价格快照 */
    private BigDecimal cartPrice;

    /** 是否选中(1:是,0:否) */
    private Integer selected;

    /** 创建时间 */
    private Date createdTime;

    /** 更新时间 */
    private Date updatedTime;

    // 关联查询的字段
    /** 商品名称 */
    private String productName;



    /** 商品主图 */
    private String mainImage;

    /** 商品描述 */
    private String description;

    /** 商品单位 */
    private String productUnit;

    /** 会员名称 */
    private String memberName;

    /** 店铺名称 */
    private String shopName;

    public void setId(Integer id) 
    {
        this.id = id;
    }

    public Integer getId() 
    {
        return id;
    }

    public void setMemberId(Integer memberId) 
    {
        this.memberId = memberId;
    }

    public Integer getMemberId() 
    {
        return memberId;
    }

    public void setProductId(Integer productId) 
    {
        this.productId = productId;
    }

    public Integer getProductId() 
    {
        return productId;
    }

    public void setQuantity(Integer quantity) 
    {
        this.quantity = quantity;
    }

    public Integer getQuantity() 
    {
        return quantity;
    }

    public BigDecimal getCurrentPrice() 
    {
        return currentPrice;
    }

    public void setCurrentPrice(BigDecimal currentPrice) 
    {
        this.currentPrice = currentPrice;
    }

    public BigDecimal getCartPrice() 
    {
        return cartPrice;
    }

    public void setCartPrice(BigDecimal cartPrice) 
    {
        this.cartPrice = cartPrice;
    }

    public void setPrice(BigDecimal price) 
    {
        this.price = price;
    }

    public BigDecimal getPrice() 
    {
        return price;
    }

    public void setSelected(Integer selected) 
    {
        this.selected = selected;
    }

    public Integer getSelected() 
    {
        return selected;
    }

    public void setCreatedTime(Date createdTime) 
    {
        this.createdTime = createdTime;
    }

    public Date getCreatedTime() 
    {
        return createdTime;
    }

    public void setUpdatedTime(Date updatedTime) 
    {
        this.updatedTime = updatedTime;
    }

    public Date getUpdatedTime() 
    {
        return updatedTime;
    }

    public String getProductName() 
    {
        return productName;
    }

    public void setProductName(String productName) 
    {
        this.productName = productName;
    }

    public String getMainImage() 
    {
        return mainImage;
    }

    public void setMainImage(String mainImage) 
    {
        this.mainImage = mainImage;
    }

    public String getDescription() 
    {
        return description;
    }

    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getProductUnit() 
    {
        return productUnit;
    }

    public void setProductUnit(String productUnit) 
    {
        this.productUnit = productUnit;
    }

    public String getMemberName() 
    {
        return memberName;
    }

    public void setMemberName(String memberName) 
    {
        this.memberName = memberName;
    }

    public String getShopName() 
    {
        return shopName;
    }

    public void setShopName(String shopName) 
    {
        this.shopName = shopName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("memberId", getMemberId())
            .append("productId", getProductId())
            .append("quantity", getQuantity())
            .append("price", getPrice())
            .append("currentPrice", getCurrentPrice())
            .append("cartPrice", getCartPrice())
            .append("selected", getSelected())
            .append("createdTime", getCreatedTime())
            .append("updatedTime", getUpdatedTime())
            .append("productName", getProductName())
            .append("mainImage", getMainImage())
            .append("description", getDescription())
            .append("productUnit", getProductUnit())
            .append("memberName", getMemberName())
            .append("shopName", getShopName())
            .toString();
    }
}
